#ifndef __SEM2_H__
#define __SEM2_H__

/*
 * Structure de données pour la gestion des sémaphores
 */
typedef struct thread_sem thread_sem_t;

extern int thread_sem_init(thread_sem_t **sem, unsigned int value);

extern int thread_sem_wait(thread_sem_t *sem);

extern int thread_sem_post(thread_sem_t *sem);

extern int thread_sem_getvalue(thread_sem_t *sem, int * sval);

extern int thread_sem_destroy(thread_sem_t *sem);

#endif /* __SEM2_H__ */
